Skip to content

Conversation

wearyzen
Copy link
Contributor

@wearyzen wearyzen commented Aug 28, 2025

Zephyr's TF-M has been aligned with upstream TF-M v2.2.0, which includes
Corstone-320 (CS320) support so, enable build and execution of
non-secure variants of MPS4-based boards.
In addition, temporarily disable treating warnings as error for MPS4
tests, since TF-M currently produces a few warnings that are non-trivial
to resolve. This will be revisited once the warnings are addressed
upstream.

@zephyrbot zephyrbot added area: TF-M ARM Trusted Firmware-M (TF-M) platform: ARM Arm Limited labels Aug 28, 2025
@wearyzen wearyzen force-pushed the cs320_ns_support branch 2 times, most recently from 84cf3df to 0c64bb1 Compare September 1, 2025 15:03
@wearyzen wearyzen requested a review from nordicjm September 1, 2025 15:04
@wearyzen wearyzen marked this pull request as draft September 2, 2025 10:36
@wearyzen wearyzen marked this pull request as ready for review September 4, 2025 09:21
@wearyzen wearyzen marked this pull request as draft September 8, 2025 15:01
@wearyzen wearyzen closed this Oct 2, 2025
@wearyzen wearyzen reopened this Oct 2, 2025
@wearyzen wearyzen force-pushed the cs320_ns_support branch 4 times, most recently from d24debb to 94e1c79 Compare October 3, 2025 16:12
@wearyzen wearyzen marked this pull request as ready for review October 3, 2025 16:13
ithinuel
ithinuel previously approved these changes Oct 6, 2025
@wearyzen
Copy link
Contributor Author

wearyzen commented Oct 6, 2025

@nordicjm, could you please have another look at this and let me know your feedback?

What is the change?
Split and redefine the DDR4 device tree nodes, in their respective board
variants so that linker scripts automatically generates a memory section
for each node.

Why do we need this change?
According to the official memory map of Corstone-320 available here:
https://developer.arm.com/documentation/109760/0000/SSE-320-FVP/SSE-320-FVP-memory-map
the non-secure world alias of DDR4 starts at 0x6000_0000 and
the secure world alias starts at 0x7000_0000.

Previously, the shared DDR4 node in mps4_common.dtsi listed multiple
regions, but Zephyr generated a linker memory region **only** for the
first address (0x6000_0000). This broke samples like `tflm_ethosu`,
on Corstone-320, which expect DDR4 memory region to start at 0x7000_0000
for secure variants of the MPS4 board.

Moving DDR4 definitions to per-board dts files ensures Zephyr creates
correct memory regions for each variant.
This also makes all the DDR4 regions available for applications to use
not just the first (applications would otherwise have to use some linker
magic to make those regions available in linker script).

Signed-off-by: Sudan Landge <[email protected]>
The TF-M requirements document contained a hard-coded list of Python
packages which is incomplete and can easily drift out of sync with the
TF-M project. Replace this list with a reference to TF-M’s own
``tools/requirements.txt`` so that all required dependencies are covered.

Also update the list of boards that support TF-M.

Signed-off-by: Sudan Landge <[email protected]>
Use the flash layout recommended by mcuboot for consistency.

Signed-off-by: Sudan Landge <[email protected]>
Copy link

github-actions bot commented Oct 9, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
trusted-firmware-m zephyrproject-rtos/trusted-firmware-m@3e12b0c zephyrproject-rtos/trusted-firmware-m@591f37f (main) zephyrproject-rtos/[email protected]

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@github-actions github-actions bot added manifest manifest-trusted-firmware-m DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Oct 9, 2025
@wearyzen wearyzen force-pushed the cs320_ns_support branch 2 times, most recently from 2bdcde5 to 61b1174 Compare October 9, 2025 09:13
Use TF-M that has cherry-picked commits from upstream to fix compiler
warnings for MPS4.

Signed-off-by: Sudan Landge <[email protected]>
Zephyr's TF-M has been aligned with upstream TF-M v2.2.0, which adds
support for Corstone-320 (CS320). The previous commit also updates TF-M
to fix compiler warnings seen with MPS4. So, with this update, enable
build and execution of non-secure variants of MPS4-based boards.

Signed-off-by: Sudan Landge <[email protected]>
@github-actions github-actions bot removed the DNM (manifest) This PR should not be merged (controlled by action-manifest) label Oct 9, 2025
Copy link

sonarqubecloud bot commented Oct 9, 2025

@wearyzen
Copy link
Contributor Author

wearyzen commented Oct 9, 2025

@tomi-font @nordicjm @henrikbrixandersen the concerns have been addressed and TF-M is updated to fix the warnings. Could you please have another look at this PR?

@wearyzen wearyzen added this to the v4.3.0 milestone Oct 10, 2025
@wearyzen wearyzen removed this from Release Plan Oct 10, 2025
@jhedberg jhedberg merged commit 826742f into zephyrproject-rtos:main Oct 14, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants